package com.itheima.user.feign;

import com.itheima.common.pojo.TbOrder;
import com.itheima.user.feign.fallback.OrderFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "order-service",fallback = OrderFeignFallback.class)
public interface OrderFeign {
    @GetMapping("/order/{username}")
    public List<TbOrder> findOrderByUsername(@PathVariable("username") String username);
}
